package com.itfenghuang.day05.controller;

import com.itfenghuang.bean.Student;
import com.itfenghuang.day05.service.StudentService;
import com.itfenghuang.day05.service.imp.StudentServiceImp;
import org.junit.Test;

import java.util.ArrayList;
import java.util.List;

public class StudentServlet {
    private StudentService service=new StudentServiceImp();
    //根据sid查询学生
    @Test
    public void test1(){
        ArrayList<Integer> list = new ArrayList<>();
        list.add(1);
        list.add(3);
        list.add(5);
        List<Student> students = service.selectStusBySids(list);
        System.out.println(students);
    }

    //查询全部学生
    @Test
    public void test2(){
        List<Student> list = service.selectAllStus();
        System.out.println(list);
    }

    //查询两个表
    @Test
    public void test3(){
        List<Student> list = service.selectAllStusAndCla();
        System.out.println(list);
    }


}
